home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 October: Mac OS SDK / Dev.CD Oct 00 SDK1.toast / Development Kits / Mac OS / Apple Guide / Authoring / Documentation / Example Source Files Appdx C / Standard Setup DCCs.src < prev    next >
Encoding:
Text File  |  1994-08-24  |  9.9 KB  |  278 lines  |  [TEXT/ttxt]

  1. ######################################################################
  2. #                                                            
  3. #        File:          DCC and External Module info from Standard Setup file                
  4. #                                                            
  5. #        Copyright:     ©1994 by Apple Computer, Inc.        
  6. #                                                            
  7. ######################################################################
  8.  
  9. ######################################################################
  10. #    Context Check Definitions
  11. ######################################################################
  12.  
  13. #    Context checks are used to dynamically adapt the sequence of panels
  14. # presented to match the context of the user.
  15. #
  16. # The following context check definitions are used in Macintosh Guide 
  17. # and may also be useful for your guide file.  These definitions use
  18. # external code modules located in the Standard Resources file.
  19. #
  20. # Syntax:  <Define Context Check> contextCheckName, codeResSpec [, targetApp] 
  21. #                                 [, additionalParam] [, additionalParam] 
  22. #                                                      [, ... ]
  23.  
  24. #============================================
  25. # From external code module 'SYST' (system)
  26. #============================================
  27.  
  28. # Checking if File Sharing is on or off
  29. #
  30. #     'SYST'--> system module
  31. #     'MACS'--> current application's signature
  32. #     LONG:6--> 6 for case isFileSharing in resource file
  33. #     LONG:0--> off; LONG:1--> on
  34.  
  35. <DCC>    "FileSharingOff", 'SYST', 'MACS', LONG:6, LONG:0
  36. <DCC>    "FileSharingOn", 'SYST', 'MACS', LONG:6, LONG:1
  37.  
  38.  
  39.  
  40. # Checking if Guess Access is off
  41. #
  42. #     'SYST'--> system module
  43. #     'MACS'--> current application's signature
  44. #     LONG:10--> 10 for case isGuessAccess in resource file
  45. #     LONG:0--> fill in words for fill byte
  46.  
  47. <DCC>    "GuestAccessOff", 'SYST', 'MACS', LONG:10, LONG:0
  48.  
  49.  
  50.  
  51. # Checking the bit depth of the monitor
  52. #
  53. #     LONG:8--> 8 for case isMonitorBitDepth in resource file
  54. #     LONG--> 4 for greater than the compared value
  55. #             6 for greater than or equal to the compared value
  56. #             2 for equal to the compared vale
  57. #     LONG--> compared value, you can specify a value here or in the real context check call
  58.  
  59. <DCC>    "BitDepthGreaterThan", 'SYST', 'MACS', LONG:8, LONG:4, LONG
  60. <DCC>    "BitDepthAtLeast", 'SYST', 'MACS', LONG:8, LONG:6, LONG
  61. <DCC>    "isMonoChrome", 'SYST', 'MACS', LONG:8, LONG:2, LONG:1
  62.  
  63.  
  64.  
  65. # Checking the number of monitors
  66. #     LONG:11--> 11 for case isNumberMonitors in resource file
  67. #     LONG:4--> 4 for greater than the compared value
  68. #     LONG:1--> compared value
  69.  
  70. <DCC>    "MultipleMonitors", 'SYST', 'MACS', LONG:11, LONG:4, LONG:1 
  71.  
  72.  
  73.  
  74. # Checking if a menu item exists,or has checked mark
  75. #
  76. #     LONG:1--> 1 for case menuItemExists in resource file
  77. #               2 for case menuItemMarked in resource file
  78. #     LONG:0--> fill in a long for fill byte
  79. #     LONG:10--> 10 for the string parameter matches the menu name
  80. #     LPSTRING--> the string parameter for comparing with menu name
  81. #     LONG--> 10 for the string parameter matches the menu item name
  82. #             8 for the string parameter contains anything
  83. #     LPSTRING--> the string parameter for comparing with menu item name
  84.  
  85. <DCC>     "IsMenuExists", 'SYST', 'MACS', LONG:1, LONG:0, LONG:10, LPSTRING, LONG:8, LPSTRING
  86. <DCC>     "IsMenuItemExists", 'SYST', 'MACS', LONG:2, LONG:0, LONG:10, LPSTRING, LONG:10, LPSTRING
  87. <DCC>     "IsMenuItemChecked", 'SYST', 'MACS', LONG:2, LONG:0, LONG:10, LPSTRING, LONG:10, LPSTRING
  88. <DCC>     "CDMenuItemExists", 'SYST', 'aucd', LONG:2, LONG:0, LONG:10, LPSTRING, LONG:10, LPSTRING
  89.  
  90.  
  91.  
  92. # Checking the processor type
  93. #
  94. #     LONG:0--> for case gestaltCheck in resource file
  95. #     OSTYOE:'proc'--> the Gestalt selector you want to use, in this case, it's 'proc'
  96. #     LONG--> 5 for less than; 7 for less than or equal to; 3 for not equal to; 2 for equal to
  97. #     SHORT:0--> fill in a short for fill byte
  98. #     LONG--> gestalt compare value
  99.  
  100. <DCC>    "CPUIs68040",  'SYST', 'MACS', LONG:0, OSTYPE:'proc', LONG:5, SHORT:0, LONG:2
  101. <DCC>    "CPU030orGreater",  'SYST', 'MACS', LONG:0, OSTYPE:'proc', LONG:6, SHORT:0, LONG:4
  102. <DCC>    "CPU68kArch",  'SYST', 'MACS', LONG:0, OSTYPE:'proc', LONG:7, SHORT:0, LONG:5
  103. <DCC>    "CPUIs68000",  'SYST', 'MACS', LONG:0, OSTYPE:'proc', LONG:3, SHORT:0, LONG:5
  104. <DCC>    "CPU1bitQD",  'SYST', 'MACS', LONG:0, OSTYPE:'qd  ', LONG:2, SHORT:0, LONG:0x000
  105.  
  106.  
  107.  
  108. # Others
  109.  
  110. <DCC>    "NetworkName", 'SYST', 'MACS', LONG:9, LONG:0, LONG:8
  111.  
  112.  
  113.  
  114. #============================================
  115. # From external code module 'File' 
  116. #============================================
  117.  
  118. # Checking if a named file is in a special type folder, for instances: 
  119. # Extensions, Apple Menu Folder, and so on
  120. #
  121. #     'FILE'--> file module
  122. #     'MACS'--> current application's signature
  123. #     LONG:9--> 9 for case isFileExists in resource file
  124. #     OSTYPE:'extn'--> specify the type of file; if it's an init indicate 'extn'; 
  125. #                      if it's a control panel indicate 'ctrl', and so on.
  126. #     LONG:0--> fill in a long for fill byte
  127. #     LPSTRING--> will be the name of the file you want to check
  128. #     example usage: InControlPanelFolder("Sharing Setup")
  129.  
  130. <DCC>    "InExtensions",  'FILE', 'MACS', LONG:9, OSTYPE:'extn', LONG:0, LPSTRING
  131. <DCC>    "InSystemFolder", 'FILE', 'MACS', LONG:9, OSTYPE:'macs', LONG:0, LPSTRING
  132. <DCC>    "InAppleMenuFolder",  'FILE', 'MACS', LONG:9, OSTYPE:'amnu', LONG:0, LPSTRING
  133. <DCC>    "InControlPanelFolder", 'FILE', 'MACS', LONG:9, OSTYPE:'ctrl', LONG:0, LPSTRING
  134. <DCC>    "AppleShareInstalled",  'FILE', 'MACS', LONG:9, OSTYPE:'extn', LONG:0, LPSTRING:"AppleShare"
  135. <DCC>    "PrintMonitorInstalled",  'FILE', 'MACS', LONG:9, OSTYPE:'extn', LONG:0, LPSTRING:"PrintMonitor"
  136. <DCC>    "GXInstalled",  'FILE', 'MACS', LONG:9, OSTYPE:'extn', LONG:0, LPSTRING:"QuickDraw™ GX"
  137. <DCC>    "RamDiskExists", 'FILE', 'MACS', LONG:9, OSTYPE:'desk', LONG:0, LPSTRING:"Ram Disk"
  138.  
  139.  
  140. #     'FILE'--> file module
  141. #     'MACS'--> current application's signature
  142. #     LONG:0--> for case isFrontStartUp in resource file
  143.  
  144. <DCC>    "BootDiskWinActive", 'FILE', 'MACS', LONG:0
  145.  
  146.  
  147.  
  148. #     'FILE'--> file module
  149. #     'MACS'--> current application's signature
  150. #      LONG:1--> for case isOpenStartUp in resource file
  151.  
  152. <DCC>    "BootDiskWinOpen", 'FILE', 'MACS', LONG:1
  153.  
  154.  
  155.  
  156. # Others
  157.  
  158. <DCC>    "ControlPanelWinActive", 'FILE', 'MACS', OSTYPE:'ctrl', LONG:0
  159. <DCC>    "SystemFolderWinActive", 'FILE', 'MACS', OSTYPE:'macs', LONG:0
  160. <DCC>    "AppleMenuWinActive",  'FILE', 'MACS', OSTYPE:'amnu', LONG:0
  161. <DCC>    "ExtensionsWinActive",  'FILE', 'MACS', OSTYPE:'extn', LONG:0
  162. <DCC>    "AppleMenuWinOpen",  'FILE', 'MACS', OSTYPE:'amnu', LONG:1
  163. <DCC>    "ExtensionsWinOpen",  'FILE', 'MACS', OSTYPE:'extn', LONG:1
  164.  
  165.  
  166.  
  167. #============================================
  168. # From external code module 'WIND' (window)
  169. #============================================
  170.  
  171. # Checking if a named window is open or active
  172. #     'WIND'--> window module
  173. #     'MACS'--> current application's signature, if do not specify 
  174. #               the signature here, you'll need to specify it in the 
  175. #               actual context check call
  176. #     LONG:-->  0 for case isFront in resource file, which means the 
  177. #                    window is the frontmost (active) one
  178. #               1 for case isOpen in resource file, which means the window is open
  179. #               3 for case isShareWindowActive
  180. #     LONG:0--> fill in a long for fill byte
  181. #     LONG:--> 10 for the window name exactly matches the string parameter
  182. #              11 for window name contains the string parameter
  183. #              8  for window name contains any string parameter
  184. #     LPSTRING--> will be the name of the window you want to check
  185. #     example usage: OpenWindow('MACS',"Sharing Setup")
  186.  
  187. <DCC>    "OpenWindow", 'WIND', , LONG:1, LONG:0, LONG:10, LPSTRING
  188. <DCC>    "OpenWindowIsInfo", 'WIND','MACS', LONG:1, LONG:0, LONG:11, LPSTRING:"Info"
  189. <DCC>    "ActiveWindow", 'WIND', , LONG:0, LONG:0, LONG:10, LPSTRING
  190. <DCC>    "ActiveWindowIsInfo", 'WIND','MACS', LONG:0, LONG:0, LONG:11, LPSTRING:"Info"
  191. <DCC>    "AnyActiveWindow", 'WIND','MACS', LONG:0, LONG:0, LONG:8
  192. <DCC>    "ActiveWindowIsSharing" , 'WIND', 'MACS', LONG:3
  193.  
  194.  
  195.  
  196. # Others
  197.  
  198. <DCC>    "FindActive", 'WIND', 'MACS', LONG:3
  199. <DCC>    "FindMoreActive", 'WIND', 'MACS', LONG:4
  200.  
  201.  
  202.  
  203. #============================================
  204. # From external code module 'CHSR' (chooser)
  205. #============================================
  206.  
  207. #     'CHSR'--> chooser module
  208. #     'MACS'--> current application's signature
  209. #     LONG:4 --> for case isPrinterType in resource file
  210. #     LONG:0--> fill in a long for fill byte
  211. #     LONG:10--> the string parameter matches the printer name
  212. #     LPSTRING --> the name of the printer you want to check
  213.  
  214. <DCC>    "SelectedPrinter", 'CHSR', 'MACS', LONG:4, LONG:0, LONG:10, LPSTRING
  215.  
  216.  
  217.  
  218. #     LONG:0 --> for case isPrinterDirect in resource file
  219.  
  220. <DCC>    "DirectConnectPrinter", 'CHSR', 'MACS', LONG:0
  221.  
  222.  
  223.  
  224. # Others
  225.  
  226. <DCC>    "AppleTalkOff", 'CHSR', 'MACS', LONG:5, LONG:0
  227. <DCC>    "NetworkPrinter", 'CHSR', 'MACS', LONG:1, LONG:6, LONG:1
  228. <DCC>    "NetworkHasZones", 'CHSR', 'MACS', LONG:9
  229. <DCC>    "NoSelectedPrinter", 'CHSR', 'MACS', LONG:4, LONG:0, LONG:9, LPSTRING
  230.  
  231.  
  232.  
  233. #============================================
  234. # From external code module 'PCSS' (process)
  235. #============================================
  236.  
  237. #     'PCSS'--> process module
  238. #     'MACS'--> pass 'MACS'
  239. #     LONG--> 0 for the specified app is active; 1 for the window(s) 
  240. #                   of the specified app is active
  241. #     OSTYPE--> pass the application's signature 
  242. #     example usage: ActiveAppIs('fndf')
  243.  
  244. <DCC>    "ActiveAppIs",'PCSS','MACS', LONG:0,OSTYPE
  245. <DCC>    "OpenAppIs",'PCSS','MACS', LONG:1,OSTYPE
  246.  
  247.  
  248.  
  249. #============================================
  250. # From external code module 'DLOG' (dialog)
  251. #============================================
  252.  
  253. <DCC>    "ActiveDialog", 'DLOG', 'MACS', LONG:0, LONG
  254. <DCC>    "AnyActiveDialog", 'DLOG', 'aucd', LONG:5
  255.  
  256.  
  257.  
  258. #============================================
  259. # From external code module 'DTPr' (desktop printer)
  260. #============================================
  261.  
  262. <DCC>    "IsThereDTPrinter", 'DTPr',FRONT
  263.  
  264.  
  265.  
  266. #============================================
  267. # From external code module 'Pddm' (PDD maker)
  268. #============================================
  269.  
  270. <DCC>    "IsItPDDMaker", 'Pddm', FRONT, PSTRING
  271.  
  272.  
  273.  
  274.  
  275.  
  276.